﻿using System.Data.Entity.ModelConfiguration;

namespace CS795.TravelAgency.CarRental.Domain.Entities.Configurations
{
    public class QuoteConfiguration : EntityTypeConfiguration<Quote>
    {
        public QuoteConfiguration()
        {
            HasKey(p => p.Id);
            Property(p => p.Price).HasPrecision(18, 2).IsRequired();
            HasRequired(p => p.User).WithMany().HasForeignKey(p => p.UserId);
            Property(p => p.Type).IsRequired();
            Property(p => p.StartDate).IsRequired();
            Property(p => p.EndDate).IsRequired();
        }
    }
}
